package org.eiahe.hr.attendance.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.ehe.common.excel.convert.ExcelDictConvert;
import org.eiahe.hr.attendance.domain.EmployeeAttendanceType;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 员工考勤类型视图对象 hr_employee_attendance_type
 *
 * @author zhangnn
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = EmployeeAttendanceType.class)
public class EmployeeAttendanceTypeVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 员工考勤类型ID
     */
    @ExcelProperty(value = "员工考勤类型ID")
    private Long id;

    private Long userId;

    /**
     * 员工ID
     */
    @ExcelProperty(value = "员工编号")
    private String employeeNo;

    /**
     * 员工姓名
     */
    @ExcelProperty(value = "员工姓名")
    private String employeeName;

    /**
     * 考勤类型ID
     */
    @ExcelProperty(value = "考勤类型ID")
    private Long typeId;

    /**
     * 考勤类型名称
     */
    @ExcelProperty(value = "考勤类型名称")
    private String typeName;

    /**
     * 生效日期
     */
    @ExcelProperty(value = "生效日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate effectiveDate;

    /**
     * 失效日期(NULL表示永久有效)
     */
    @ExcelProperty(value = "失效日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate expiryDate;

    /**
     * 状态(0-失效 1-生效)
     */
    @cn.idev.excel.annotation.ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @org.ehe.common.excel.annotation.ExcelDictFormat(dictType = "sys_normal_disable")
    private String status;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private LocalDateTime createTime;
}
